﻿using Script.Interpreter;
using Script.Interpreter.IO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GVmakerForWin
{
     partial class MainForm : Form
    {
        VirtualMachine VM;
        public MainForm()
        {
            InitializeComponent();
            mainCanvas.BackColor = Color.White;
          
        }

        private void MainForm_KeyPress(object sender, KeyPressEventArgs e)
        {

        }

        private void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            Keys keys =e.KeyCode;
            if(keys == Keys.PageUp)
            {
            }
                VM.nextStep();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            VM = new VirtualMachine(new GvmConfig(), new DefaultFileModel(new FileS()), new DefaultKeyModel(new SysInfo()));
            VM.loadApp(LavApp.createLavApp(new System.IO.FileStream("新英雄坛说.lav", System.IO.FileMode.Open)));
        }
    }
}
